#include "EpilFunctionBodyExpressionInterpreter.h"
#include "EpilInterpreter.h"
#include "EpilInterpreterException.h"


EpilFunctionBodyExpressionInterpreter::EpilFunctionBodyExpressionInterpreter( EpilInterpreter * interpreter )
: EpilInterpreterBase( interpreter )
{
}


void EpilFunctionBodyExpressionInterpreter::Run( const EpilFunctionBodyExpressionCode * code )
{
	const list<tstring> & parameters = code->GetParameterList()->GetParameterNames();
	bool hasVariousParameters = code->GetParameterList()->HasVariousParameters();
	const EpilChunkCode * block = code->GetChunk();

	m_function = this->GetInterpreter()->CreateScriptFunctionObject( parameters, block, hasVariousParameters );
}